\name{coef.cv.conreg}
\alias{coef.cv.conreg}
\title{get coefficients or make coefficient predictions from a "cv.conreg" object.}
\description{
This function gets coefficients or makes coefficient predictions from a cross-validated conreg model,
using the stored \code{"conreg.fit"} object, and the optimal value
chosen for \code{lambda}.
}
\usage{
\method{coef}{cv.conreg}(object,s=c("lambda.1se","lambda.min"),...)
}
\arguments{
	\item{object}{fitted \code{\link{cv.conreg}} object.}
	\item{s}{value(s) of the penalty parameter \code{lambda} at which
	predictions are required. Default is the value \code{s="lambda.1se"} stored
	on the CV \code{object}, it is the largest value of \code{lambda} such that error is
	within 1 standard error of the minimum. Alternatively \code{s="lambda.min"} can be
	used, it is the optimal value of \code{lambda} that gives minimum
	cross validation error \code{cvm}. If \code{s} is numeric, it is taken as the value(s) of
	\code{lambda} to be used.}
	\item{\dots}{not used. Other arguments to predict. } 
}
\details{This function makes it easier to use the results of
cross-validation to get coefficients or make coefficient predictions.}
\value{The object returned depends the \dots argument which is passed on
to the \code{\link{predict}} method for \code{\link{conreg}} objects.}
\author{Yi Yang and Hui Zou\cr
Maintainer: Yi Yang  <yiyang@umn.edu>}
\references{
Yang, Y. and Zou, H. (2012), "An Efficient Algorithm for Computing The HHSVM and Its Generalizations," \emph{Journal of Computational and Graphical Statistics}, 22, 396-415.\cr
BugReport: \url{http://code.google.com/p/conreg/}\cr

Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized
linear models via coordinate descent," \emph{Journal of Statistical Software, 33, 1.}\cr
\url{http://www.jstatsoft.org/v33/i01/}}

\seealso{\code{\link{cv.conreg}}, and \code{\link{predict.cv.conreg}} methods.}
\examples{
x=matrix(rnorm(100*10),100,10)
y=rnorm(100)
cv=cv.conreg(x=x, y=y, 
	family = "ls", lambda2 = 1, nfolds=5)
coef(cv,s="lambda.min")
}
\keyword{models}
\keyword{regression}